﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
using DCRF.Common.Interface;

namespace DCRF.BaseBlocks.Commander.Console.Nodes
{
    class ServiceNode: INode
    {
        public TreeNode myNode = null;
        public IBlockWeb myWeb = null;
        public Guid myId = Guid.Empty;
        public string myService = null;

        public ServiceNode(TreeNode node, IBlockWeb web, Guid id, string service)
        {
            myNode = node;
            myWeb = web;
            myId = id;
            myService = service;
            myNode.Tag = this;

            Refresh();
        }

        public object ProcessRequest(string serviceName, params object[] args)
        {
            return null;
        }

        public List<string> Commands
        {
            get
            {
                List<string> result = new List<string>();
                return result;
            }
        }


        public void Refresh()
        {
            myNode.Nodes.Clear();

            myNode.Text = myService;
        }
    }
}
